import axios from "@/api/axios"

function getGradeConsumptionTrend(startDate, endDate) {
    return axios.get('/consumption-trend/grade', {
        params: {
            startDate,
            endDate
        }
    })
}

function getGradeConsumptionTrendByMonth(year, month) {
    return axios.get('/consumption-trend/grade-by-month', {
        params: {
            year,
            month
        }
    })
}

function getGradeConsumptionSummary(startDate, endDate) {
    return axios.get('/consumption-summary/grade', {
        params: {
            startDate,
            endDate
        }
    })
}

function getGenderConsumptionSummary(startDate, endDate) {
    return axios.get('/consumption-summary/gender', {
        params: {
            startDate,
            endDate
        }
    })
}

function getLocationConsumptionSummary(startDate, endDate, type) {
    return axios.get('/consumption-summary/location', {
        params: {
            startDate,
            endDate,
            type
        }
    })
}

export {
    getGradeConsumptionTrend,
    getGradeConsumptionTrendByMonth,
    getGradeConsumptionSummary,
    getGenderConsumptionSummary,
    getLocationConsumptionSummary
}